package cn.xanderye.mdblog.service;

import cn.xanderye.mdblog.base.BaseService;
import cn.xanderye.mdblog.entity.Article;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author hbxz
 * @date 2018/12/19 0019
 */
@FeignClient(name = "mdblog-service", path = "article")
public interface ArticleService extends BaseService<Article> {

    /**
     * 获取文章
     * @param id
     * @return cn.xanderye.mdblog.entity.Article
     * @author yezhendong
     * @date 2019/9/3
     */
    @GetMapping("findArticleById")
    Article findArticleById(@RequestParam Long id);

    /**
     * 分页查询文章
     * @param article
     * @param page
     * @param rows
     * @return com.github.pagehelper.PageInfo
     * @author yezhendong
     * @date 2020/1/20
     */
    @PostMapping("queryPageListByWhereDesc")
    PageInfo<Article> queryPageListByWhereDesc(@RequestBody Article article, @RequestParam Integer page, @RequestParam Integer rows);
}
